import request from '@/utils/request'

// 查询设备型号列表
export function getDeviceModelPage(query) {
  return request({
    url: '/admin-api/zufang/device-model/page',
    method: 'get',
    params: query
  })
}

export function listGatewayModelChoose() {
  return request({
    url: '/manage-api/business/gatewayModel/select',
    method: 'get'
  })
}

// 查询设备型号详细
export function getDeviceModel(deviceModelId) {
  return request({
    url: '/admin-api/zufang/device-model/get?id=' + deviceModelId,
    method: 'get'
  })
}

// 新增设备型号
export function createDeviceModel(data) {
  return request({
    url: '/admin-api/zufang/device-model/create',
    method: 'post',
    data: data
  })
}

// 修改设备型号
export function updateDeviceModel(data) {
  return request({
    url: '/admin-api/zufang/device-model/update',
    method: 'put',
    data: data
  })
}

// 删除设备型号
export function deleteDeviceModel(deviceModelId) {
  return request({
    url: '/admin-api/zufang/device-model/delete?id=' + deviceModelId,
    method: 'delete'
  })
}

// 设备型号下拉选择
export function getSimpleDeviceModelList() {
    return request({
        url: '/admin-api/zufang/device-model/list-all-simple',
        method: 'get'
    })
}
